import { BrowserWindow } from 'electron';
import { IPCListener } from './IPCListener';
import { WindowResizer } from './WindowResizer';
import { APIClient } from './APIHandler/APIClient'

import { Config } from '../configuration/config';
export class windowManager {
  private readonly browserWindow: BrowserWindow;
  private readonly IPCListener: IPCListener;
  constructor(browserWindow: BrowserWindow, config:Config,MIN_HEIGHT: number) {
    this.browserWindow = browserWindow;
    this.IPCListener = new IPCListener(
      this.browserWindow,
      new WindowResizer(this.browserWindow, MIN_HEIGHT),
      new APIClient(config)
    );
  }

  public init() {
    this.IPCListener.handleInputSizeChange();
    this.IPCListener.monitorTextEmpty();
    this.IPCListener.handleTranslationRequest();
  }
}
